package com.clouddo.common.exception;

import lombok.Data;

import java.beans.Transient;
@Data
public class CustomException extends RuntimeException {

    /**
     * 异常辅助数据，传给前端，放到JSONResult.data
     */
    protected Object data;

    public CustomException(String message) {
        super(message);
    }

    public CustomException(String message, Throwable cause) {
        super(message, cause);
    }

    public CustomException(Throwable cause) {
        super(cause);
    }

    @Transient
    @Override
    public StackTraceElement[] getStackTrace() {
        return super.getStackTrace();
    }

    @Transient
    @Override
    public synchronized Throwable getCause() {
        return super.getCause();
    }

}
